--- a/src/VBox/Additions/common/VBoxGuestLib/Makefile.km	2013-09-04 21:03:47.334749420 +0200
+++ b/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk	2013-10-21 00:06:36.418245968 +0200
@@ -40,8 +40,8 @@
 	VBoxGuestR3LibShared
 ifndef VBOX_ONLY_TESTSUITE
  if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd)
-  LIBRARIES += \
-  	VBoxGuestR3LibXFree86
+#  LIBRARIES += \
+#        VBoxGuestR3LibXFree86
  endif
 endif
 LIBRARIES.win.amd64 += VBoxGuestR3Lib-x86 VBoxGuestR3LibShared-x86

--- a/src/VBox/Additions/x11/Makefile.kmk	2013-03-19 18:55:28.974949837 +0000
+++ b/src/VBox/Additions/x11/Makefile.kmk	2013-03-19 18:56:00.468064457 +0000
@@ -17,6 +17,10 @@
 SUB_DEPTH = ../../../..
 include $(KBUILD_PATH)/subheader.kmk
 
+ifn1of ($(XSERVER_VERSION), 13 14 15 16 17 18 19 110 111)
+ XSERVER_VERSION := 17
+endif
+
 # Include sub-makefiles.
 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
  include $(PATH_SUB_CURRENT)/VBoxClient/Makefile.kmk

--- a/src/VBox/Additions/x11/vboxmouse/Makefile.kmk	2013-03-19 18:55:28.818284256 +0000
+++ b/src/VBox/Additions/x11/vboxmouse/Makefile.kmk	2013-03-19 18:56:00.468064457 +0000
@@ -29,7 +29,6 @@
 # vboxmouse_drv
 #
 if1of ($(KBUILD_TARGET), linux)
- SYSMODS += vboxmouse_drv
  vboxmouse_drv_TEMPLATE = VBOXGUESTR3XF86MOD
  vboxmouse_drv_DEFS.linux = linux
  vboxmouse_drv_DEFS.x86 += __i386__
@@ -69,7 +68,6 @@
 #
 # vboxmouse_drv_70
 #
-DLLS += vboxmouse_drv_70
 vboxmouse_drv_70_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxmouse_drv_70_DEFS = \
 	XFree86Server IN_MODULE XFree86Module XFree86LOADER XINPUT XORG_7X IN_XF86_MODULE DONT_DEFINE_WRAPPERS NO_ANSIC
@@ -85,7 +83,6 @@
 #
 # vboxmouse_drv_71
 #
-DLLS += vboxmouse_drv_71
 vboxmouse_drv_71_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxmouse_drv_71_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
 vboxmouse_drv_71_INCS := \
@@ -100,7 +97,6 @@
 #
 # vboxmouse_drv_13
 #
-DLLS += vboxmouse_drv_13
 vboxmouse_drv_13_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxmouse_drv_13_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
 vboxmouse_drv_13_INCS := \
@@ -114,7 +110,6 @@
 #
 # vboxmouse_drv_14
 #
-DLLS += vboxmouse_drv_14
 vboxmouse_drv_14_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxmouse_drv_14_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
 vboxmouse_drv_14_INCS := \
@@ -128,7 +123,6 @@
 #
 # vboxmouse_drv_15
 #
-DLLS += vboxmouse_drv_15
 vboxmouse_drv_15_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxmouse_drv_15_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
 vboxmouse_drv_15_INCS := \
@@ -142,7 +136,6 @@
 #
 # vboxmouse_drv_16
 #
-DLLS += vboxmouse_drv_16
 vboxmouse_drv_16_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxmouse_drv_16_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
 vboxmouse_drv_16_INCS := \

--- a/src/VBox/Additions/x11/vboxvideo/Makefile.kmk	2013-03-19 18:55:28.974949837 +0000
+++ b/src/VBox/Additions/x11/vboxvideo/Makefile.kmk	2013-03-19 18:56:00.468064457 +0000
@@ -53,7 +53,6 @@
 # vboxvideo_drv
 #
 if1of ($(KBUILD_TARGET), linux)
- SYSMODS += vboxvideo_drv
 endif   # target linux
 vboxvideo_drv_TEMPLATE = VBOXGUESTR3XF86MOD
 vboxvideo_drv_DEFS.linux = linux
@@ -128,7 +127,6 @@
 #         base keywords instead of using .solaris or .linux.
 #         Also it is *important* to use := and not = when deriving a property.
 #
-DLLS += vboxvideo_drv_70
 vboxvideo_drv_70_TEMPLATE = VBOXGUESTR3XORGMOD
 if1of ($(KBUILD_TARGET), linux)
  vboxvideo_drv_70_CFLAGS += \
@@ -149,7 +147,6 @@
 #
 # vboxvideo_drv_71
 #
-DLLS += vboxvideo_drv_71
 vboxvideo_drv_71_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_71_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_71_DEFS := $(vboxvideo_70_DEFS) XORG_VERSION_CURRENT=700100000
@@ -164,7 +161,6 @@
 #
 # vboxvideo_drv_13
 #
-DLLS += vboxvideo_drv_13
 vboxvideo_drv_13_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_13_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_13_DEFS := $(vboxvideo_13_DEFS) XORG_VERSION_CURRENT=100300000
@@ -178,7 +174,6 @@
 #
 # vboxvideo_drv_14
 #
-DLLS += vboxvideo_drv_14
 vboxvideo_drv_14_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_14_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_14_DEFS := $(vboxvideo_13_DEFS) XORG_VERSION_CURRENT=100400000
@@ -192,7 +187,6 @@
 #
 # vboxvideo_drv_15
 #
-DLLS += vboxvideo_drv_15
 vboxvideo_drv_15_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_15_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_15_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=100503000
@@ -213,7 +207,6 @@
 #
 # vboxvideo_drv_16
 #
-DLLS += vboxvideo_drv_16
 vboxvideo_drv_16_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_16_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_16_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=100600000
@@ -227,7 +220,6 @@
 #
 # vboxvideo_drv_17
 #
-DLLS += vboxvideo_drv_17
 vboxvideo_drv_17_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_17_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_17_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=100699000
@@ -241,7 +233,6 @@
 #
 # vboxvideo_drv_18
 #
-DLLS += vboxvideo_drv_18
 vboxvideo_drv_18_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_18_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_18_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=100800000
@@ -255,7 +246,6 @@
 #
 # vboxvideo_drv_19
 #
-DLLS += vboxvideo_drv_19
 vboxvideo_drv_19_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_19_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_19_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=100900000
@@ -269,7 +259,6 @@
 #
 # vboxvideo_drv_110
 #
-DLLS += vboxvideo_drv_110
 vboxvideo_drv_110_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_110_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_110_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=101000000
@@ -283,7 +272,6 @@
 #
 # vboxvideo_drv_111
 #
-DLLS += vboxvideo_drv_111
 vboxvideo_drv_111_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_111_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_111_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=101100000
@@ -297,7 +285,6 @@
 #
 # vboxvideo_drv_112
 #
-DLLS += vboxvideo_drv_112
 vboxvideo_drv_112_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_112_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_112_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=101200000
@@ -341,6 +328,23 @@
 endif
 
 
+vboxvideo_drv_$(XSERVER_VERSION)_NAME := vboxvideo_drv
+vboxvideo_drv_$(XSERVER_VERSION)_INCS := \
+	/usr/include/xorg \
+	/usr/include/x11 \
+	/usr/include/pixman-1 \
+	/usr/include/X11/dri \
+	/usr/include/drm \
+	/usr/include/libdrm
+vboxvideo_drv_$(XSERVER_VERSION)_INCS += $(PATH_ROOT)/src/VBox/Runtime/include
+DLLS += vboxvideo_drv_$(XSERVER_VERSION)
+
+# required for lenny backports
+ifeq ($(XSERVER_VERSION),14)
+	vboxvideo_drv_$(XSERVER_VERSION)_INCS += $(VBOX_PATH_X11_XORG_1_4)/xorg
+endif
+
+
 # Check the undefined symbols in the X.Org modules against lists of allowed
 # symbols.  Not very elegant, but it will catch problems early.
 
